package com.framework.core.result;


import java.util.List;

/**
* @Description:   分页查询返回结果封装
* @Author:         wangzhiqiang
* @CreateDate:     2019-04-15 11:17
* @Version:        1.0
*/
public class BasePage<T> {

    /**
     * 页码，从1开始
     */
    private int pageNo;

    /**
     * 页面大小
     */
    private int pageSize;

    /**
     * 总数
     */
    private int total;

    /**
     * 总页数
     */
    private int pages;

    /**
     * 数据
     */
    private List<T> data;

    public BasePage(){
    }

    public BasePage(int pageNo, int pageSize){
        this.pageNo = pageNo;
        this.pageSize = pageSize;
    }

    public BasePage(int pageNo, int pageSize, int total, int pages, List<T> data){
        this.pageNo = pageNo;
        this.pageSize = pageSize;
        this.total = total;
        this.pages = pages;
        this.data = data;
    }

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getPages() {
        return pages;
    }

    public void setPages(int pages) {
        this.pages = pages;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
